home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / gfx / fu1_62.lha / fu / Rexx / anim4.rexx < prev    next >
OS/2 REXX Batch file  |  1995-03-31  |  1KB  |  62 lines

  1. /* FU Arexxtester */
  2.  
  3. options results
  4.  
  5. ADDRESS REXX_FU
  6.  
  7. say 'FU-ArexxAnim';say;
  8.  
  9. SetIter '10';
  10. if RC~=0 then call AppError('SetIter',RC);
  11.  
  12. xs1=-2.0;ys1=-2.5;xs2=4.0;ys2=2.5
  13. xe1=1.8934;ye1=-1.7549;xe2=2.1944;ye2=-1.5196
  14.  
  15. frames=50
  16.  
  17. do i=0 to frames
  18.     xstep=(xe2-xe1)/10
  19.     ystep=(ye2-ye1)/10
  20.  
  21.     name='xh3:frames/MAGNETZOOM.'right(i,3,'0');
  22.     say 'Working on : ' name;
  23.     say 'Zoom       : ' xe1 ye1 xe2 ye2;
  24.  
  25.     SetZoom xe1 ye1 xe2 ye2;
  26.     if RC~=0 then call AppError('SetZoom',RC);
  27.  
  28.     RenderPicture;
  29.     if RC~=0 then call AppError('RenderPicture',RC);
  30.  
  31.     SavePicture name '2'
  32.     if RC~=0 then call AppError('SavePicture',RC);
  33.  
  34.     xe1=xe1-xstep;
  35.     xe2=xe2+xstep;
  36.     ye1=ye1-ystep;
  37.     ye2=ye2+ystep;
  38.  
  39.     if xe1<xs1 and xe2>xs2 and ye1<ys1 ans ye2>ys2 then i=frames
  40. end
  41.  
  42. ActivateFU;
  43. if RC~=0 then call AppError('ActivateFU',RC);
  44.  
  45. ExitFU;
  46. if RC~=0 then call AppError('ExitFU',RC);
  47.  
  48. exit
  49.  
  50. AppError:procedure
  51.     cmd=arg(1);
  52.     ret=arg(2);
  53.     say 'Application Error';say;
  54.     say 'Command 'cmd' failed with Returncode 'ret;
  55.     select
  56.         when ret='1' then say '    => unknown command';
  57.         when ret='2' then say '    => unknown parameter';
  58.         otherwise say '    => unknown returncode';
  59.     end
  60.     say;
  61. return
  62.